package com.zqweb.gulimall.order;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.amqp.rabbit.annotation.EnableRabbit;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.session.data.redis.config.annotation.web.http.EnableRedisHttpSession;
import org.springframework.transaction.annotation.EnableTransactionManagement;

@SpringBootApplication
@MapperScan("com.zqweb.gulimall.order.dao")
@EnableRabbit // 开启RabbitMQ的MQ支持
@EnableDiscoveryClient // 开启服务的注册与发现
@EnableRedisHttpSession // 开启SpringSession的Redis存储支持
@EnableFeignClients(basePackages = {"com.zqweb.gulimall.order.feign"})
@EnableTransactionManagement // 开启事务管理，能扫描@Transactional注解，添加事务支持
@EnableAspectJAutoProxy(exposeProxy = true) // 开启AspectJ的自动动态代理支持，并将代理对象进行暴露，只要通过AopContext.currentProxy()即可实现动态代理
public class Order_MainApplication {
    public static void main(String[] args) {
        SpringApplication.run(Order_MainApplication.class,args);
    }
}
